package com.lq.educationsystem.teacher.feign;

import com.lq.educationsystem.common.entiy.ScoreTb;
import com.lq.educationsystem.common.util.Result;
import com.lq.educationsystem.common.util.ResultPage;
import com.lq.educationsystem.common.vo.ScorePageVo;
import com.lq.educationsystem.common.vo.SubjectStudentScoreVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Component
@FeignClient(name = "lq-score",url = "http://localhost:9000/")
public interface ScoreFeign {
    //通过学生id集合和课程id查询当前科目内所有学生的分数
    @RequestMapping("/score/base/query/subject/student/score")
    public ResultPage<ScoreTb> querySubjectStudentScoreByStudentId(@RequestBody List<Integer> studentIdInfoList, @RequestParam("subjectId") Integer subjectId);

    //通过学生id集合 和课程id 批量添加数据
    @RequestMapping("/score/base/query/student/subject/socre")
    public Result<ScoreTb> addSubjectStudentScoreByStudentIdAndSubjectId(@RequestBody List<Integer> studentIdInfoList, @RequestParam("subjectId") Integer subjectId);

    //分数修改
    @RequestMapping("/score/base/update/student/score")
    public Result updateStudentScoreByStudentIdAndSubjectId(@RequestBody SubjectStudentScoreVo subjectStudentScoreVo);
}
